//
// Created by Administrator on 2024/5/31.
//

#include "Recursion.h"

//用递归调用求n!
long f(int n)
{
    long value;
    if (n == 0 || n == 1)
        value = 1;
    else
        value = n * f(n - 1);
    return value;
}

void printRecursion(){
    int n=10;
    printf("%ld \n",f(n));
}